<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增地址')" />
</head>
<!--<script th:src="@{/js/jquery.validate.js}"></script>
<script type="text/javascript">
	$(function(){
		$("#myform").validate();
	});
</script>-->
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-address-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">城市：</label>
				<div class="col-sm-8">
					<input id="city" name="city" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">行政区：</label>
				<div class="col-sm-8">
					<input id="district" name="district" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">街道：</label>
				<div class="col-sm-8">
					<input id="street" name="street" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">社区：</label>
				<div class="col-sm-8">
					<input id="community" name="community" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">小区：</label>
				<div class="col-sm-8">
					<input id="village" name="village" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/address"
		$("#form-address-add").validate({
			rules:{
				city:{
					required:true,
				},district:{
					required:true,
				},street:{
					required:true,
				},community:{
					required:true,
				},village:{
					required:true,
				}
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-address-add').serialize());
	        }
	    }
	</script>
</body>
</html>
